package com.ss.android.article.share.d;

import android.content.Context;
import com.ss.android.article.share.e.c;
import com.ss.android.article.share.entity.BaseShareContent;
import com.ss.android.article.share.entity.ShareAction;
import com.ss.android.article.share.entity.ShareImageBean;

public final class e {
    public BaseShareContent a;
    private c b;
    private Context c;
    private boolean d;

    public e(Context arg2) {

        this.a = new BaseShareContent();
        this.c = arg2;
    }

    public e(Context arg2, boolean arg3) {

        this.a = new BaseShareContent();
        this.d = arg3;
        this.c = arg2;
    }

    public final boolean a() {
        boolean v0 = this.b == null || this.a == null ? false : this.b.a(this.a);
        return v0;
    }

    public final e a(ShareAction arg3) {
        switch(f.a[arg3.ordinal()]) {
            case 1: {
                this.b = h.a(this.c, this.d);
                h.a(this.c, this.d).a(false);
                break;
            }
            case 2: {
                this.b = h.a(this.c, this.d);
                h.a(this.c, this.d).a(true);
                break;
            }
            case 3: {
                this.b = new com.ss.android.article.share.d.c(this.c);
                break;
            }
            case 4: {
                this.b = new a(this.c);
                break;
            }
            case 5: {
                this.b = new g(this.c);
                break;
            }
            case 6: {
                this.b = new b(this.c);
                break;
            }
            case 7: {
                this.b = new d(this.c);
                break;
            }
        }

        return this;
    }

    public final e a(ShareImageBean arg2) {
        this.a.setMedia(arg2);
        return this;
    }

    public final e a(String arg2) {
        this.a.setTitle(arg2);
        return this;
    }

    public final e b(String arg2) {
        this.a.setText(arg2);
        return this;
    }

    public final e c(String arg2) {
        this.a.setTargetUrl(arg2);
        return this;
    }
}

